<template>
  <div class="view-dialog">
    <el-dialog :before-close="handleClose" :visible.sync="dialog" title="机构详细信息">
      <div class="dialog-tablewrap">
        <el-table :data="tableData" :show-header="false" stripe>
          <el-table-column prop="title" min-width="10" align="center"/>
          <el-table-column prop="content" min-width="30"/>
          <el-table-column min-width="10">
            <template slot-scope="scope">
              <div style="float:right;">
                <el-button type="text">{{ scope.row.click }}</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleClose">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    visibleDialog: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      tableData: [
        {
          title: '用户名',
          content: '中科教育',
          click: '个人主页'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        },
        {
          title: 'Email',
          content: 'asdbiuui@qq.com'
        }
      ]
    }
  },
  computed: {
    dialog() {
      return this.visibleDialog
    }
  },
  methods: {
    handleClose() {
      this.$emit('closeView')
    }
  }
}
</script>

<style lang="scss">
.view-dialog {
  .el-dialog {
    width: 660px;
    height: 750px;
    .dialog-tablewrap {
      width: 100%;
    }
  }
}
</style>
